<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Test whether an entry represents a directory</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rarentry.getversion.html">RarEntry::getVersion</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rarentry.isencrypted.html">RarEntry::isEncrypted</a></div>
 <div class="up"><a href="class.rarentry.html">RarEntry</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="rarentry.isdirectory" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">RarEntry::isDirectory</h1>
  <p class="verinfo">(PECL rar &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">RarEntry::isDirectory</span> &mdash; <span class="dc-title">Test whether an entry represents a directory</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-rarentry.isdirectory-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>RarEntry::isDirectory</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Tests whether the current entry is a directory.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-rarentry.isdirectory-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-rarentry.isdirectory-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if this entry is a directory and <strong><code>FALSE</code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-rarentry.isdirectory-notes">
  <h3 class="title">注释</h3>
  <p class="para">
  This function is only available starting with version 2.0.0, but one can
  also test whether an entry is a directory by checking the entry attributes,
  like this (only works for files compressed in RAR for Windows or Unix):
  <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//...<br />//Open&nbsp;file,&nbsp;get&nbsp;entry&nbsp;and&nbsp;store&nbsp;in&nbsp;variable&nbsp;$e...<br />//...<br /><br /></span><span style="color: #0000BB">$isDirectory&nbsp;</span><span style="color: #007700">=&nbsp;(bool)&nbsp;(((</span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getHostOs</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #0000BB">RAR_HOST_WIN32</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;(</span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getAttr</span><span style="color: #007700">()&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">0x10</span><span style="color: #007700">))&nbsp;||<br />&nbsp;&nbsp;&nbsp;&nbsp;((</span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getHostOs</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #0000BB">RAR_HOST_UNIX</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;((</span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getAttr</span><span style="color: #007700">()&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">0xf000</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0x4000</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
  </div>

  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rarentry.getversion.html">RarEntry::getVersion</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rarentry.isencrypted.html">RarEntry::isEncrypted</a></div>
 <div class="up"><a href="class.rarentry.html">RarEntry</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
